﻿#pragma once
#include <d3dx9.h>
class Camera2D
{
private:
	D3DXVECTOR3 mPos;
	//Ma trận để di chuyển Camera
	D3DXMATRIX mMatrixTransform;
	//Vùng bao xung quay màn hình
	RECT mBoundScreen;
public:
	Camera2D();
	~Camera2D();
	bool mIsStopScrollScreen;
	void SetBound(RECT rect);
	float mSpeedX;

	bool mIsDonePrepare;
	float posXTarget;

	void Update(float x, float deltaTime);
	bool move(float vx, float posXTarget, float deltaTime, bool dir = false);//mac dinh di qua ben phai
	D3DXVECTOR3 getPosCamera();
	D3DXVECTOR3 getPointTransform(float x, float y);
	RECT getScreen();
};

